package com.onepower.core.modules.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.onepower.core.domain.request.CreateMatchScheduleForm;
import com.onepower.core.domain.request.MatchScheduleQuery;
import com.onepower.core.domain.response.MatchCheckInfo;
import com.onepower.core.domain.response.MatchScheduleInfo;
import com.onepower.core.modules.repository.entity.MatchSchedule;
import com.baomidou.mybatisplus.extension.service.IService;
import com.onepower.core.result.CommonResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 比赛场次表 服务类
 * </p>
 *
 * @author kin
 * @since 2018-08-06
 */
public interface IMatchScheduleService extends IService<MatchSchedule> {

    CommonResult createScheduleServiceByOnline(List<CreateMatchScheduleForm> forms) throws IOException;

    CommonResult createScheduleByImport(Integer matchId, MultipartFile file) throws Exception;

    MatchScheduleInfo getSchedule(Integer id);

    Page<MatchScheduleInfo> getScheduleList(Page<MatchScheduleInfo> page, MatchScheduleQuery query);

    MatchScheduleInfo getMatchScheduleLockedByReferee(Integer matchId, Integer matchAdminId);

    List<MatchScheduleInfo> getMultiMatchScheduleLockedByReferee(Integer matchId, Integer matchAdminId);

    Page<MatchCheckInfo> getMatchScheduleCheckPage(Page<MatchCheckInfo> page, Integer matchPlaceId);

    CommonResult updateMatchSchedule(Map map);
}
